package com.jy.api.dao;

import com.jy.api.domain.MaterialUnit;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface MaterialUnitDao extends CrudRepository<MaterialUnit, Integer>, JpaSpecificationExecutor<MaterialUnit> {


    MaterialUnit  findByNameAndStoreId(String name,String storeId);




    List<MaterialUnit>  findByStoreIdOrderByIdDesc(String storeId);


    List<MaterialUnit> findByNameLikeAndStoreIdOrderByIdDesc(String name, String storeId);

}
